package com.twu.biblioteca.LibraryContents;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by ppeter on 01/10/2014.
 */
public class Book extends GenericCheckoutItem {
    String author;
    String title;
    int year;

    public Book(String title_, String author_, int year_, String id_){
        super(id_);
        this.author = author_;
        this.title = title_;
        this.year = year_;
    }

    public String getTitle(){
        return this.title;
    }

    public String getAuthor(){
        return this.author;
    }

    public int getYear(){
        return this.year;
    }

    @Override
    public List<String> getInfoColumns() {
        List<String> result = new ArrayList<String>();
        result.add(this.id);
        result.add(this.title);
        result.add(this.author);
        result.add(Integer.toString(this.year));
        return result;
    }
}
